import Vue from 'vue'
import VueRouter from 'vue-router'
import detail from '../views/detail.vue'
import imageDetail from '../views/imageDetail.vue'
import imageAll from '../views/imageAll.vue'
import list from '../views/list.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/detail/:id',
    name: 'detail',
    component: detail
  },
  {
    path: '/imageAll/:type',
    name: 'imageAll',
    component: imageAll
  },
  {
    path: '/imageDetail',
    name: 'imageDetail',
    component: imageDetail
  },
  {
    path: '/',
    name: 'list',
    component: list
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
